#ifndef COLLECTDEIVCEFORM_H
#define COLLECTDEIVCEFORM_H

#include <QWidget>
#include <QMap>
#include "AttribBaseForm.h"
#include "toObject/ModelXml.h"
namespace Ui {
class CollectDeivceForm;
}

class CollectDeivceForm : public AttribBaseForm
{
    Q_OBJECT

public:
    explicit CollectDeivceForm(QWidget *parent = nullptr);
    ~CollectDeivceForm();


    //void SetDeviceInfo(stCollecDevice * dev);

private:
    void InitUIData() override;
    void saveModel() override;

    stCollecDevice *saveChanngeData();
private slots:
    void on_comboBox_currentIndexChanged(int index);

    QWidget * GetProtocalConfigWidget(QString protocalName);

private:
    Ui::CollectDeivceForm *ui;
    QMap<QString,QWidget *> m_mapChilds;

    QWidget * m_pointWidget { nullptr };
    stCollecDevice *m_devInfo{ nullptr};
//    stCollecDevice m_collectDevice;
};

#endif // COLLECTDEIVCEFORM_H
